<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>添加用户</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f4f4f4;
        }
        .container {
            width: 80%;
            margin: 20px auto;
            overflow: hidden;
            background: #fff;
            padding: 20px;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
        }
        header {
            background: #333;
            color: #fff;
            padding: 20px;
            text-align: center;
        }
        nav {
            display: flex;
            justify-content: center;
            background: #555;
            padding: 10px 0;
        }
        nav a {
            color: white;
            text-decoration: none;
            padding: 0 15px;
        }
        nav a:hover {
            background: #444;
        }
        form {
            margin-top: 20px;
        }
        form label {
            display: block;
            margin-bottom: 5px;
        }
        form input[type="text"],
        form input[type="email"],
        form input[type="password"],
        form select {
            width: calc(100% - 20px);
            padding: 10px;
            margin-bottom: 10px;
            border: 1px solid #ddd;
        }
        form input[type="button"] {
            padding: 10px 20px;
            background: #333;
            color: #fff;
            border: none;
            cursor: pointer;
            float: right;
        }
        form input[type="button"]:hover {
            background: #444;
        }
        footer {
            background: #333;
            color: #fff;
            text-align: center;
            padding: 10px 0;
            position: relative;
            bottom: 0;
            width: 100%;
        }
    </style>
</head>
<body>
    <header>
        <h1>添加用户</h1>
    </header>
    <nav>
        <a href="index.html">返回首页</a>
        <a href="users.html">用户管理</a>
    </nav>
    <div class="container">
        <h2>添加新用户</h2>
        <form>
            <label for="username">用户名：</label>
            <input type="text" id="username" name="username" required>

            <label for="email">邮箱：</label>
            <input type="email" id="email" name="email" required>

            <label for="password">密码：</label>
            <input type="password" id="password" name="password" required>

            <label for="confirm_password">确认密码：</label>
            <input type="password" id="confirm_password" name="confirm_password" required>

            <label for="role">角色：</label>
            <select id="role" name="role">
                <option value="admin">管理员</option>
                <option value="user">用户</option>
            </select>

            <input type="button" class="adduser" value="添加用户">
        </form>
    </div>
    <footer>
        <p>版权所有 © 2024 新闻网站</p>
    </footer>
</body>
</html>